//
//  DCReceiveOrderHeader.m
//  JiuyaoDriver
//
//  Created by 大橙子 on 2018/11/26.
//  Copyright © 2018 Tomous. All rights reserved.
//

#import "DCReceiveOrderHeader.h"
@interface DCReceiveOrderHeader ()

@end

@implementation DCReceiveOrderHeader
-(instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setUpBaseHeaderView];
    }
    return self;
}

-(void)layoutSubviews {
    [super layoutSubviews];
    
    [self setBaseHeaderViewLayoutSubviews];
}
-(void)setModel:(DCOrderReceiveModel *)model {
    _model = model;
    
//    self.carrierLabel.text = model.carrier;
    self.carrierLabel.text = [UserInfo shareInstance].record.companyName;
    self.timeLabel.attributedText = [YLAttributedStr changeSubStringWithTotalString:[NSString stringWithFormat:@"已下发%@",Str_IsEmpty(model.taskTime)?@"0分钟":model.taskTime] subStringColor:[UIColor redColor] subString:Str_IsEmpty(model.taskTime)?@"0分钟":model.taskTime andFont:FONT(14)];
    if ([model.taskStatus integerValue] == 02) {
        self.stateLabel.text = @"待接单";
    }
    self.stateLabel.textColor = [UIColor redColor];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
